Skip to main content

Overview

The AWS VPC Terraform module simplifies the creation of production-ready Virtual Private Clouds on AWS. It provides a flexible, reusable foundation for your infrastructure with support for multi-AZ deployments, multiple subnet types, and advanced networking features.

Quick Start

Get your VPC up and running in minutes with basic configuration

Architecture

Understand the networking architecture and design patterns

Configuration Guide

Learn how to configure subnets, NAT gateways, and VPC endpoints

Reference

Complete reference for all inputs, outputs, and resources

Key Features

Multi-AZ Deployment

Deploy public, private, database, and ElastiCache subnets across multiple availability zones for high availability

Flexible NAT Gateways

Choose between per-AZ NAT gateways for redundancy or a single shared gateway for cost optimization

VPC Endpoints

Enable private connectivity to S3 and DynamoDB without internet gateway traffic

Comprehensive Tagging

Apply custom tags to all resources for organization, cost tracking, and governance

Quick Example

module "vpc" {
  source = "github.com/Planview/tf_aws_vpc"

  name = "production-vpc"
  cidr = "10.0.0.0/16"
  
  azs             = ["us-west-2a", "us-west-2b", "us-west-2c"]
  private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"]
  public_subnets  = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"]
  
  enable_nat_gateway = true
  enable_dns_hostnames = true

  tags = {
    Terraform   = "true"
    Environment = "production"
  }
}

Getting Started

1

Review the architecture

Understand the networking architecture and how the module creates VPCs, subnets, and routing tables.
2

Follow the quickstart

Use the quickstart guide to deploy your first VPC with recommended settings.
3

Customize your configuration

Explore configuration options to tailor the VPC to your specific requirements.
4

Review examples

Check out real-world examples for different deployment scenarios.